package com.nabi.library.utility
{
	import com.nabi.library.contents.elements.Outline;
	import com.nabi.library.contents.elements.style.IFill;
	import com.nabi.library.contents.elements.style.IStroke;
	import com.nabi.library.contents.elements.style.Style;
	
	import flash.display.Graphics;
	import flash.geom.Matrix;

	public class Drawer
	{
		public function Drawer()
		{
			throw new Error("Static Class");
		}
		
		static public function Draw($graphics:Graphics, $outline:Outline, $style:Style, $matrix:Matrix): void
		{
			var fill:IFill = $style.GetFill();
			var stroke:IStroke = $style.GetStroke();
			
			stroke.Draw($graphics);
			fill.Draw($graphics, $matrix);
			$graphics.drawPath($outline.GetCommands(), $outline.GetPoints());
		}
	}
}